<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav">
	<span class="layui-breadcrumb">
		<a>首页</a>
		<a>系统设置</a>
		<a>投注/中奖统计</a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
</div>

<div class="x-body">
	<xblock class="layui-clear">
		<form action="?" class="layui-form" method="get">
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
			<div class="left">
				<input name="dt1" id="dt1" type="text" value="{$dt1}" class="layui-input date" style="width:100px;" placeholder="开始时间" />
			</div>
			<div class="left margin-l10" style="padding-top:10px;">~</div>
			<div class="left margin-l10">
				<input name="dt2" id="dt2" type="text" value="{$dt2}" class="layui-input date" style="width:100px;" placeholder="结束时间" />
			</div>
			<div class="left margin-l10">
				<input name="title" id="title" type="text" value="{$title}" class="layui-input" style="width:260px;" placeholder="请输入账号" />
			</div>
			<div class="left margin-l10">
				<input type="submit" name="search" class="layui-btn" value="搜索" />
			</div>
			<div class="left margin-l10">
				<button class="layui-btn layui-btn-danger" type="button" onclick="location.href='{U($m.'/'.$c.'/recharge')}'"><i class="layui-icon"></i>充值/提现统计</button>
			</div>
			<div class="left margin-l10">
				<button class="layui-btn layui-btn-danger" type="button" onclick="location.href='{U($m.'/'.$c.'/lottery')}'"><i class="layui-icon"></i>彩种投注/中奖统计</button>
			</div>		
		</form>
	</xblock>
	
	<div id="hchart" class="mt-15"></div>
	<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
	<script>
		$().ready(function(){
			/**
			  * Highcharts 在 4.2.0 开始已经不依赖 jQuery 了，直接用其构造函数既可创建图表
			 **/
			var chart = new Highcharts.Chart('hchart', {
				title: {
					text: '每日投注/中奖情况 总投注：{$investtotal}元，总中奖：{$prizetotal}元',
					y: 15
				},
				xAxis: {
					categories: ['{implode("','",array_keys($charts["invest"]))}']
				},
				yAxis: {
					title: {
						text: ''
					},
					plotLines: [{
						value: 0,
						width: 1,
						color: '#808080'
					}]
				},
				tooltip: {
					valueSuffix: '元'
				},
				legend: {
					layout: 'vertical',
					align: 'right',
					verticalAlign: 'middle',
					borderWidth: 0
				},
				series: [{
					name: '投注金额',
					data: [{implode(',',$charts['invest'])}]
				},{
					name: '中奖金额',
					data: [{implode(',',$charts['prize'])}]
				}]
			});
		});
	</script>	
</div>

{template index/footer}